{{extend('./layout.html')}} 
{{#block('body')}}
<script type="text/javascript" charset="utf-8" src="/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/ueditor/ueditor.all.js">
</script>
<script type="text/javascript" charset="utf-8" src="/ueditor/lang/zh-cn/zh-cn.js">
</script>
<div class="panel panel-default">
    <div class="panel-heading">
        <ol class="breadcrumb">
            <li><a href="#">首页</a></li>
            <li><a href="#">视频管理</a></li>
            <li><a href="#">信息修改</a></li>
        </ol>
    </div>
    <div class="panel-body">
        <form action="/video/edit/{{vid}}" method="post" class="form-horizontal">
            <div class="form-group">
                <label for="vtitle" class="col-sm-2 control-label">视频标题</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="vtitle" id="vtitle" placeholder="视频标题" value="{{vtitle}}">
                </div>
            </div>
            <div class="form-group">
                <label for="vsortno" class="col-sm-2 control-label">排序号</label>
                <div class="col-sm-10">
                    <input type="Number" class="form-control" name="vsortno" id="vsortno" placeholder="排序号" value="{{vsortno}}">
                </div>
            </div>
            <div class="form-group">
                <label for="vvideoid" class="col-sm-2 control-label">视频id</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="vvideoid" id="vvideoid" placeholder="视频id" value="{{vvideoid}}">
                </div>
            </div>
            <div class="form-group">
                <label for="vsummary" class="col-sm-2 control-label">视频摘要</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="vsummary" id="vsummary" placeholder="视频摘要" value="{{vsummary}}">
                </div>
            </div>
            <div class="form-group">
                <label for="vimg" class="col-sm-2 control-label">视频图片</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="vimgurl" id="vimgurl" placeholder="视频图片" value="{{vimgurl}}">
                </div>
            </div>
            <div class="form-group">
                <label for="vremark" class="col-sm-2 control-label">视频详情</label>
                <div class="col-sm-10">
                    <script id="editor" name="vremark" type="text/plain" style="width:100%;height:300px;"></script>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <input type="submit" class="btn btn-default">
                </div>
            </div>
        </form>
    </div>
</div>
<script>
	//调用此方法创建编辑器
    var ue = UE.getEditor('editor',null,function(){
    	// html字符串传到前台会被转义成实体字符
    	//通过jq的html方法转化成html再填充到编辑器的输入框中
    	var content=$("<div/>").html("{{vremark}}").text();
    	ue.setContent(content);
    });

</script>
{{/block}}